package com.nbjtjc.safe.mapper.safe;

import com.nbjtjc.safe.model.safe.RiskPoint;
import com.nbjtjc.util.MyMapper;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface RiskPointMapper extends MyMapper<RiskPoint> {



    List<RiskPoint> search(@Param("rp") RiskPoint riskPoint);

    int insertN(@Param("rp") RiskPoint riskPoint);

    List<RiskPoint> findByIds(@Param("ids") List<Integer> ids);


    @Update("update risk_point set item_count=#{itemCount} where id=#{id}")
    int updateCountByPrimaryKey(@Param("itemCount") int itemCount,@Param("id") int id);

    @Select("select max(point_order) from risk_point where enterprise_id=#{enterpriseId}")
    int selectMaxOrder(@Param("enterpriseId") int enterpriseId);

}